# KERNELDIR := /home/book/100ask_imx6ull-sdk/Linux-4.9.88
# CURRENT_PATH := $(shell pwd)

# obj-m := dht11_drv.o

# build: kernel_modules

# kernel_modules:
# 	$(MAKE) -C $(KERNELDIR) M=$(CURRENT_PATH) modules
# 	$(CROSS_COMPILE)gcc -o dht11_drv dht11_drv.c 
# clean:
# 	$(MAKE) -C $(KERNELDIR) M=$(CURRENT_PATH) clean

KERN_DIR =  /home/stu/imx6ull-sdk/Linux-4.9.88
all:
	make -C $(KERN_DIR) M=`pwd` modules 
	$(CROSS_COMPILE)gcc -o adcAPP adcAPP.c
clean:
	make -C $(KERN_DIR) M=`pwd` modules clean
	rm -rf modules.order  adcAPP

# 参考内核源码drivers/char/ipmi/Makefile
# 要想把a.c, b.c编译成ab.ko, 可以这样指定:
# ab-y := a.o b.o
# obj-m += ab.o

obj-m += adc_drv.o

